#ifndef XMODEL_H_
#define XMODEL_H_

/************************************************************************/
/*  XModel class: Callum Brighting, based on Ben Martins implementation */
/************************************************************************/

//not used currently, still handy to keep around for debugging

#include <d3dx9.h>

class XModel
{
public:
    /* Default Ctr */
    XModel();
    XModel(const XModel& other)
    {
        m_mesh = 0;
        m_meshMaterials = other.m_meshMaterials;
        m_numMaterials = other.m_numMaterials;
        m_meshTextures = other.m_meshTextures;
        m_normalTextures = other.m_normalTextures;
    }
    /* The main Load function */
    bool Load(const char* fileName, bool bumpMaps);
    /* The Main Render function */
    void Render(ID3DXEffect* effect);
    /* Manual release function */
    void Release();

public:
    //so we can clone the mesh
    /* The mesh */
    LPD3DXMESH          m_mesh; 

    //so we can cahnge the texture
    /* texture data*/
    LPDIRECT3DTEXTURE9* m_meshTextures; 
    
    //so we can manually render
    /* how many materials in this mesh */
    DWORD               m_numMaterials;

    /* the materials */
    D3DMATERIAL9*       m_meshMaterials;
    
    /* Normal texture data */
    LPDIRECT3DTEXTURE9* m_normalTextures;
    

    short* TerminateEnd(const char* fileName);
};


#endif